package com.yiban.demo.LoginUser.Entity;

import org.springframework.cglib.beans.BeanCopier;

public class LoginUserTransfer {
    private static final BeanCopier POToVoCopier = BeanCopier.create(LoginUserPO.class, LoginUserVO.class, false);
    private static final BeanCopier VOToPoCopier = BeanCopier.create(LoginUserVO.class, LoginUserPO.class, false);

    public static LoginUserPO transToLoginPo(LoginUserVO loginUserVO) {
        final LoginUserPO userPO = new LoginUserPO();
        VOToPoCopier.copy(loginUserVO, userPO, null);
        return userPO;
    }

    public static LoginUserVO transToLoginVo(LoginUserPO loginUserPO) {
        final LoginUserVO vo = new LoginUserVO();
        POToVoCopier.copy(loginUserPO,vo,null);
        return vo;
    }
}
